public class Main {
    public static void main(String[] args) {

        StringParserStateMachine sm = new StringParserStateMachine();

        String input = "\"Hello\\nWorld!\"";

        System.out.println("输入: " + input);
        System.out.println("逐字符解析...\n");

        for (char c : input.toCharArray()) {
            sm.input(c);
        }

        System.out.println("\n解析结果:");
        System.out.println(sm.getResult());
    }
}
